/****************************************************************************
 *
 *  3DSVPRT.H
 *
 *  (C) Copyright 1997 by Autodesk, Inc.
 *
 *  This program is copyrighted by Autodesk, Inc. and is licensed to you under
 *  the following conditions.  You may not distribute or publish the source
 *  code of this program in any form.  You may incorporate this code in object
 *  form in derivative works provided such derivative works are (i.) are de-
 *  signed and intended to work solely with Autodesk, Inc. products, and (ii.)
 *  contain Autodesk's copyright notice "(C) Copyright 1995 by Autodesk, Inc."
 *
 *  AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.  AUTODESK SPE-
 *  CIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
 *  A PARTICULAR USE.  AUTODESK, INC.  DOES NOT WARRANT THAT THE OPERATION OF
 *  THE PROGRAM WILL BE UNINTERRUPTED OR ERROR FREE.
 *
 ***************************************************************************/

#ifndef VPRT_3DS_H
#define VPRT_3DS_H

/* Public Typedefs */
typedef enum
{
   NoView3ds,
   TopView3ds,
   BottomView3ds,
   LeftView3ds,
   RightView3ds,
   FrontView3ds,
   BackView3ds,
   UserView3ds,
   CameraView3ds,
   SpotlightView3ds
} viewtype3ds;

typedef struct
{
   ushort3ds xpos;
   ushort3ds ypos;
   ushort3ds width;
   ushort3ds height;
} viewsize3ds;

/* Used to describe top, bottom, left, right, front and back views */
typedef struct
{
   point3ds center; /* Center of orthagonal view */
   float3ds zoom; /* View zoom factor */
} orthoview3ds;

/* Used to describe user views */
typedef struct
{
   point3ds center; /* Center of user view */
   float3ds zoom; /* View zoom factor */
   float3ds horang; /* Horizontal angle of view */
   float3ds verang; /* Veritical angle of view */
} userview3ds;

/* Used to describe camera views */
typedef struct
{
   char3ds name[11]; /* Name of the camera used in the view */
} cameraview3ds;

/* Viewport structure details the kind of view in a viewport */
typedef struct
{
   viewtype3ds type; /* top, bottom, left, right, front, back, user and camera */
   viewsize3ds size; /* Size of the viewport */
   orthoview3ds ortho; /* used for top, bottom, left, right, front, and back views */
   userview3ds user; /* Used for user views */
   cameraview3ds camera; /* Used for camera views */
} viewport3ds;
/* End Public */

/* Public Prototypes */
void InitViewport3ds(viewport3ds **vp);
void ReleaseViewport3ds(viewport3ds **vp);
void GetViewport3ds(database3ds *db, viewport3ds **vp);
void PutViewport3ds(database3ds *db, viewport3ds *vp);
void CopyViewport3ds(database3ds *destdb, database3ds *srcdb);
/* End Public */

void PutViewportEntry3ds(chunk3ds *section, viewport3ds *vp);

#endif
